package com.itboye.textileexpres.myset;

import java.util.List;

import com.itboye.textileexpes.beans.KefuBeans;
import com.itboye.textileexpes.beans.NewMeesgeBeans;
import com.itboye.textileexpes.beans.NewsMessgeBeans;
import com.itboye.textileexpres.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class AdapterCustomerService extends BaseAdapter {
	Context context;

	List<NewMeesgeBeans> list;
	public AdapterCustomerService(Context context,List<NewMeesgeBeans> list) {
		// TODO Auto-generated constructor stub
		this.context = context;
		this.list=list;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		viewHolder holder = null;
		if (convertView == null) {
			holder = new viewHolder();
			LayoutInflater inflater = LayoutInflater.from(context);
			convertView = inflater.inflate(R.layout.item_curstomer, null);
			holder.customer_name=(TextView) convertView.findViewById(R.id.customer_name);
			convertView.setTag(holder);
		} else {
			holder = (viewHolder) convertView.getTag();
		}
		holder.customer_name.setText(list.get(position).getContent());
		return convertView;
	}

	class viewHolder {
		TextView customer_name;
	}
}
